package com.zhuss.product.preline;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.zhuss.bean.bo.product.preline.CreatePrelineSignBo;
import com.zhuss.bean.bo.product.preline.DeletePrelineSignBo;
import com.zhuss.common.OperateService;
import com.zhuss.common.Processor;
import com.zhuss.exception.DzcxException;

/**
 * @description: 招募报名操作的Service
 * @author: zhushanshuo
 * @create: Wed Jan 06 16:26:20 CST 2021
 **/
@Component("prelineSignOperateService")
public class PrelineSignOperateService implements OperateService<Void, Object> {
	
	@Autowired
	@Qualifier("prelineSignCreate")
	private Processor<Object, CreatePrelineSignBo> prelineSignCreate;
	

	@Autowired
	@Qualifier("prelineSignDelete")
	private Processor<Object, DeletePrelineSignBo> prelineSignDelete;
	

	
	/**
	 * 创建
	 */
	@Override
    @Transactional(rollbackFor = Exception.class)
	public Void create(Object param) throws DzcxException {
		
		CreatePrelineSignBo bo = (CreatePrelineSignBo) param;
		
		prelineSignCreate.process(bo);
		
		return null;
	}
    
	/**
	 * 修改
	 */
	@Override
    @Transactional(rollbackFor = Exception.class)
    public Void update(Object param) throws DzcxException {

//		UpdatePrelineSignBo bo = (UpdatePrelineSignBo) param;
//
//		prelineSignUpdate.process(bo);

    	return null;
    }
	
	/**
	 * 删除
	 */
	@Override
	@Transactional(rollbackFor = Exception.class)
	public Void delete(Object param) throws DzcxException {
		
		DeletePrelineSignBo bo = (DeletePrelineSignBo) param;
		
		prelineSignDelete.process(bo);
		
		return null;
	}

}

